**********************************
* Analysis code for 
* "Digital Payments and Consumption: Evidence from the 2016 Demonetization in India" (RFS)
* Authors: Sumit Agarwal, Pulak Ghosh, Jing Li, and Tianyue Ruan
**********************************

global dir "${projectfolder}/Pain-to-pay/code-package-final/code" /*custormize your directory here*/
cd ${dir}

****0. versions of Stata & user-written packages*****
// we use several user-written packages, downloaded from SSC or 
// the authors' GitHub repositories, for our analyses. For backward 
// compatibility, we report the detailed version info and save the records in a log file.
cap log close _all
log using ../logs/versions.txt, replace text nomsg name(log1)

version
which ftools
which reghdfe
which gtools
which ivreg2
which ranktest
which ivreghdfe

log close log1

**** 1. declare paths*****
* For using the pseudo data created for the replication package
global datafolder "${dir}\pseudo-data"
* For using the actual data
// global datafolder "path omitted for confidentiality"

**** 2. run analyses and generate results*****

* Figures
do Figures_part_1.do
do Figures_part_2.do
do Figures_part_3.do

* Tables
do Tables_part_1.do
do Tables_part_2.do
do Tables_part_3.do
